home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / Chip 11-96.iso / workshop / other / testlin / testlin.exe / LINUX / USR / BIN / CALC < prev    next >
Encoding:
Text File  |  1996-07-29  |  418 b   |  26 lines

  1. #!/bin/sh
  2.  
  3. SWAPSIZE=0
  4.  
  5. while [ "$SWAPSIZE" != "" ]; do
  6. DF=`expr $SWAPSIZE`
  7. cat << EOF > /tmp/tmpmsg
  8. This is the last result from expr:
  9. $DF
  10.  
  11. Please enter the next expr string:
  12.  
  13. EOF
  14.  dialog --title "CALCULATOR" --inputbox "`cat /tmp/tmpmsg`" 20 70 \
  15.  2> /tmp/SeSSize
  16.  if [ $? = 1 -o $? = 255 ]; then
  17.   rm -f /tmp/SeSSize /tmp/tmpmsg
  18.   exit
  19.  fi
  20.  SWAPSIZE="`cat /tmp/SeSSize`"
  21.  rm -f /tmp/SeSSize /tmp/tmpmsg
  22. done
  23.  
  24. clear
  25.  
  26.